import config from "./config.env";
let env = "";
let apiJava = "";
let apiHr = "";
let apiPhp = "";
let apiYp = "";
let apiClusterJava = "";
// local:本地; test:测试服;pre:预发布服;pro:正式服
if (process.env.NODE_ENV === "development") {
  env = "pro";
  apiJava = config[env].apiJava;
  apiHr = config[env].apiHr;
  apiClusterJava = config[env].apiClusterJava;
  apiPhp = config[env].apiPhp;
  apiYp = config[env].apiYp;
}

if (process.env.NODE_ENV === "production") {
  env = "pro"; //记得上线前改成pro！！！！！！！！

  apiJava = config[env].apiJava;
  apiHr = config[env].apiHr;
  apiClusterJava = config[env].apiClusterJava;
  apiPhp = config[env].apiPhp;
  apiYp = config[env].apiYp;
}

//AI面试链接的正式域名和测试域名
var formalInterviewDomain = "https://m.job1001.com";
var testInterviewDomain = "https://m.1001.job1001.com";
let interviewDomain = "";
if (env == "local") {
  interviewDomain += formalInterviewDomain;
} else if (env == "test" || env == "localTest") {
  interviewDomain += testInterviewDomain;
} else {
  interviewDomain += formalInterviewDomain;
}
export { apiPhp, apiYp, apiJava, apiHr, apiClusterJava, env, interviewDomain };
